<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">


    <h:head>
        <title>Welcome - Stakeholder Portal</title>

    </h:head>

    <h:body>
        <h:form id="formMain">
            <p:panel id="panel" header="Add Stakeholder Portal Information">
                <p:messages />
                <h:panelGrid id="grid1" columns="3" cellpadding="5" cellspacing="0" >
                    <h:outputLabel for="stakeholderDesc" style="font-weight: bold" value="Stakeholder Description: * " />
                    <p:inputTextarea required="true" requiredMessage="Stakeholder Description is required" id="stakeholderDesc" style="width:300px;height:100px;" effectDuration="400" value="#{stakeholderManagerBean.stakeholderDesc}"> 
                        <f:validateLength minimum="4" maximum="100" />
                    </p:inputTextarea>  
                    <p:message for="stakeholderDesc" />

                    <h:outputLabel style="font-weight: bold" value="Industry: " />
                    <h:selectOneMenu required ="true" requiredMessage="Please Select Price Range" id="selectedIndustry" value="#{stakeholderManagerBean.selectedIndustry}" >
                        <f:selectItem itemLabel="Select an Industry" itemValue=" " />
                        <f:selectItems value="#{stakeholderManagerBean.industryName}" />
                    </h:selectOneMenu>
                    <p/>

                    <h:outputLabel style="font-weight: bold" value="Industry Type Details: " />
                    <p:dataTable scrollable="true" id="industryInfoTypes" value="#{stakeholderManagerBean.industryInfoTypeList}" var="industryInfoTypes" selection="#{stakeholderManagerBean.selectedIndustryInfoType}" selectionMode="multiple">
                        <p:column selectionMode="multiple" />
                        <p:column style="width:200px" >
                            #{industryInfoTypes.industryInfoTypeName}
                        </p:column>
                    </p:dataTable> 
                    <p/>

                    <h:outputLabel style="font-weight: bold" value="Halal: " />
                    <h:selectOneRadio required="true" requiredMessage="Selection is required" id="isHalal" value="#{stakeholderManagerBean.isHalal}">
                        <f:selectItem itemLabel="Yes" itemValue="Yes" />
                        <f:selectItem itemLabel="No" itemValue="No" />
                    </h:selectOneRadio>
                    <p:message for="isHalal"/>

                    <h:outputLabel style="font-weight: bold" value="Price Range: " />
                    <h:selectOneMenu required ="true" requiredMessage="Please Select Price Range" id="priceRange" value="#{stakeholderManagerBean.priceRange}" >
                        <f:selectItem itemLabel="Less Than $20" itemValue="Less Than $20" />
                        <f:selectItem itemLabel="$21 - $40" itemValue="$21 - $40"/>
                        <f:selectItem itemLabel="$41 - $60" itemValue="$41 - $60"/>
                        <f:selectItem itemLabel="$61 - $80" itemValue="$61 - $80"/>
                        <f:selectItem itemLabel="$81 - $100" itemValue="$81 - $100"/>
                        <f:selectItem itemLabel="More Than $100" itemValue="More Than $100"/>
                    </h:selectOneMenu>
                    <p:message for="priceRange"/>

                    <p:commandButton value="Save" update="grid1" actionListener="#{stakeholderManagerBean.saveStakeholder}"  ajax="true" >
                        <p:ajaxStatus style="width:16px;height:16px;">
                            <f:facet name="start">
                                <h:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" />
                            </f:facet>
                            <f:facet name="complete">
                                <h:outputText value="" />
                            </f:facet>
                        </p:ajaxStatus>
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </h:body>
</html>

